<%--
  Created by IntelliJ IDEA.
  User: Jim
  Date: 2021/6/4
  Time: 20:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/index.css">
    <title>顶部导航栏</title>
</head>
<body>
<header>
    <h1 class="title">点名与提问计分系统</h1>
    <div>${username}</div>
    <button id="quit" onclick="layout()">退出</button>
</header>
</body>
</html>
<script>
    function layout() {
        if(!confirm("真的要离开我吗？"))
           return;
        if(self === top)
            window.location.href="/quit";
        else
            top.location.href="/quit";
    }
</script>